<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  User: Ivan wei
  --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>课程查询系统</title>
    <style>
        input{
            width: 100%;
            height: 100%;
            border: none;
            outline: none;
            background-color: transparent;
            font-size: 15px;
        }
        tr{
            height: 30px;
        }
        input{
            text-align: center;
        }
        .button:hover{
            background-color: aquamarine;
        }
        a:link {color: blue; text-decoration:none;}
    </style>
</head>
<body style="min-width: 760px">
<h1 style="text-align: center">课程系统</h1>
<hr>
<div>
    <%@ include file="/common.jsp" %>
</div>
<div style="display: flex;flex-direction: column;align-items: center">
    <h2>课程管理</h2>
    <div style="width: 100% ;height: 45px;border: 1px;display: flex;align-items: center;justify-content: space-evenly;">
        <a href="/Administrator/courses.do"> 课程显示</a>
        <a href="/Administrator/courses/addCourse.do"> 课程添加</a>
    </div>
    <table  style="min-width: 760px;" border="1">
        <tr style="background-color: rgb(235,242,241);">
            <th>课程编号</th>
            <th>课程名称</th>
            <th>操作</th>
        </tr>
        <c:forEach var="Course" items="${course}">
            <form action="/Administrator/courses/update.do" method="post">
                <tr>
                    <td> <input name="id" value="<c:out value="${Course.id}"></c:out>" readonly></td>
                    <td> <input name="name" value="<c:out value="${Course.name}"></c:out>" readonly></td>
                    <td> <input class="button" type="submit" value="更改"></td>
                </tr>
            </form>

        </c:forEach>
    </table>
</div>
<h2 style="text-align: center">${err}</h2>
</body>
</html>
